<template>
  <div>
    <div class="cell">
      <img src="@/assets/WDM.jpg" style="align-items: center;" />
      <div class="title"><h1>智慧学伴</h1></div>
    </div>
    <div class="emailContent">
      <h1>验证您是该电子邮件地址的所有者</h1>
      <div class="contentText">
        <p>最近有人在验证电子邮件地址时输入了该电子邮件地址。</p>
        <p>如果这不是您本人所为，则可能是有人误输了您的电子邮件地址。</p>
        <p>您目前无需执行任何其他操作。</p>
        <p>智慧学伴团队敬上</p>
        <div class="contentTextEnglish">
          <p>Someone recently entered this E-mail address while verifying it.</p>
          <p>If you did not do this yourself,</p>
          <p>someone may have typed in your email address by mistake.</p>
          <p>You do not need to do anything else at this time.</p>
          <p>Greetings from the Wisdom Partner team</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { EmailSent } from '@/api/user'
export default {
  computed: {
    // 获取页面的uuid
    emailuuid() {
      return this.$route.query.uuid
    }
  },
  created() {
    // 向后台发请求 使邮件得到注册页面
    EmailSent(this.emailuuid).then(res => {
      // console.log(res)
      if (res.data.code === 200) {
        this.$message({
          message: '恭喜你，注册成功',
          type: 'success'
        })
      } else if (res.data.code === 402) {
        this.$message({
          message: '已完成验证 不需要重复校验',
          type: 'warning'
        })
      } else if (res.data.code === 400) {
        this.$message.error('无效令牌，或已过期')
      }
    })
  }
}
</script>

<style scoped>
.cell {
  display: flex;
  justify-content: left;
  height: 80px;
  width: 100%;
  background-color: #3f3c40;
  color: #fff;
  text-align: center;
  min-width: 1200px;
}
.emailContent {
  height: 560px;
  text-align: center;
}
.emailContent .contentText {
  border-top-style: solid;
  border-color: #ccc;
  border-width: 1px;
  width: 500px;
  text-align: left;
  margin: auto;
}
.emailContent .contentText .contentTextEnglish {
  margin-top: 60px;
  font-family: Georgia;
  color: #0000008a;
}
.emailContent h1 {
  margin: 20px;
}
.emailContent p {
  margin: 13px;
}
.title {
  margin: auto;
  height: 50px;
  line-height: 50px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  margin-right: 1rem;
}
</style>
